﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Whir.Common.WebHelper;

public partial class Whir_System_Module_Log_LogInfo : System.Web.UI.Page
{
    protected string ErrorID = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        RoleHelper.IsLogin();
        ErrorID = NetRequest.GetQueryString("errorId");
        if (!IsPostBack)
        {
            BindData();
        }
    }

    private void BindData()
    {
        DataTable dt = Whir.SQLServerDAL.DbHelperSQL.GetDataTable("*", "Whir_ErrorLog", "errorLogID=" + ErrorID, "");
        if (dt.Rows.Count > 0)
        {
            lbID.Text = dt.Rows[0]["errorLogID"].ToString();
            lbErrorUrl.Text = dt.Rows[0]["errorUrl"].ToString();
            lbCreateDate.Text = dt.Rows[0]["createDate"].ToString();
            lbIP.Text = dt.Rows[0]["IP"].ToString();
            lbErrorMessage.Text = dt.Rows[0]["errorMessage"].ToString();
            lbErrorContent.Text = dt.Rows[0]["errorContent"].ToString();
        }
        else
        {
            Response.Redirect("ErrorLog.aspx");
        }
    }

    protected void btnCancel_Click(object sender, EventArgs e)
    {
        Response.Redirect("ErrorLog.aspx");
    }
}
